<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let target = {};
        let property = 'a';

        Object.defineProperty(target, property, {
            configurable: false,
            value: 1
        });
        
        // 旧写法
        // try {
        //     Object.defineProperty(target, property, {
        //         configurable: true
        //     });
        // } catch (error) {
        //     console.log('异常：', error);
        // }

        // 新写法
        Reflect.defineProperty(target, property,{ configurable: true }) ? '' : console.log('reflect失败');
        
        // 老写法
        'assign' in Object

        // 新写法
        Reflect.has(Object, 'assign');
    </script>
</body>
</html>